package system

import "gostore/dao"

type AdminDaoT struct {
	dao.DaoT
}

var AdminDao = AdminDaoT{}

func (u AdminDaoT) Login(entity interface{}, account string, pwd string) error {
	return dao.GetDB().Where("account = ? and pwd=?", account, pwd).First(entity).Error
}

func (u AdminDaoT) GetByAccount(entity interface{}, account string) error {
	return dao.GetDB().Where("account = ?", account).First(entity).Error
}
